filechoosernativeportal: remove redundant casts
authorMichael Catanzaro <mcatanzaro@igalia.com>
Tue, 15 Jan 2019 02:53:19 +0000 (20:53 -0600)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 19 Jan 2019 01:01:52 +0000 (20:01 -0500)
We are casting from GtkFileChooserNative to... GtkFileChooserNative.
Boo.

gtk/gtkfilechoosernativeportal.c

index 912013140eccc10cb9e2bd54c25bee77885b2fd7..f3ad20053e0fa8da663cba2824ea89363508a11b 100644 (file)
@@ -332,10 +332,10 @@ show_portal_file_chooser (GtkFileChooserNative *self,
   g_variant_builder_add (&opt_builder, "{sv}", "modal",
                          g_variant_new_boolean (data->modal));
   g_variant_builder_add (&opt_builder, "{sv}", "filters", get_filters (GTK_FILE_CHOOSER (self)));
-  if (GTK_FILE_CHOOSER_NATIVE (self)->current_name)
+  if (self->current_name)
     g_variant_builder_add (&opt_builder, "{sv}", "current_name",
                            g_variant_new_string (GTK_FILE_CHOOSER_NATIVE (self)->current_name));
-  if (GTK_FILE_CHOOSER_NATIVE (self)->current_folder)
+  if (self->current_folder)
     {
       gchar *path;
 
@@ -344,7 +344,7 @@ show_portal_file_chooser (GtkFileChooserNative *self,
                              g_variant_new_bytestring (path));
       g_free (path);
     }
-  if (GTK_FILE_CHOOSER_NATIVE (self)->current_file)
+  if (self->current_file)
     {
       gchar *path;
 
@@ -354,7 +354,7 @@ show_portal_file_chooser (GtkFileChooserNative *self,
       g_free (path);
     }
 
-  if (GTK_FILE_CHOOSER_NATIVE (self)->choices)
+  if (self->choices)
     g_variant_builder_add (&opt_builder, "{sv}", "choices",
                            serialize_choices (GTK_FILE_CHOOSER_NATIVE (self)));